package org.opens.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 查询的vo, 存二进制时必须实现Serializable接口
 *
 * @author zym
 * @Date 2022/6/28 15:45
 */
@Data
public class RedisCacheSelectVO implements Serializable {

    private static final long serialVersionUID = 151641556279L;

    private String name;

    private Integer age;

    private String address;

    /**
     * 使用fastjson后, 可以使用对应的注解
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date birthdayDate;

}
